package cn.elvea.domain;

import java.io.Serializable;
import java.util.LinkedHashSet;
import java.util.Set;

public class Role extends IdEntity implements Serializable {
    public final static String ROLE_ADMIN = "admin";
    private Long id;
    private String code;
    private Set<Permission> permissions = new LinkedHashSet<>();

    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Set<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(Set<Permission> permissions) {
        this.permissions = permissions;
    }
}